#pragma once
#include "Point.h"
#include <iostream>
using namespace std;

class Link
{
private:
	Point pStart,pEnd;
	int Distance;
public:
	  Link(Point &a,Point &b,int Dist):
	  pStart(a),pEnd(b),Distance(Dist) {}

	  Point & getStart () {return pStart;}
	  Point & getEnd   () {return pEnd;}
	  int getDistance()   {return Distance;}

	  void add(int val) {Distance+=val;}

	  void setStart(Point & p) { pStart = p ;}
	  void setEnd  (Point & p) { pEnd = p ;}

	  friend ostream & operator<<(ostream & os,Link & l)
	  {
		  os<<"Distance:"<<l.getDistance()<<endl;
		  os<<"Start:";
		  cout<<l.getStart();
		  os<<"End:";
		  cout<<l.getEnd()<<endl;
	  return os;
	  }

};
